//
//  BK_Confirm_Order_DeliveryTime_Cell.m
//  bestkeep
//
//  Created by TOPTEAM on 2017/2/21.
//  Copyright © 2017年 utouu. All rights reserved.
//

#import "BK_Confirm_Order_DeliveryTime_Cell.h"
#import "BK_OD_Color.h"
#import "BK_OD_Tool.h"
@implementation BK_Confirm_Order_DeliveryTime_Cell
{
    UILabel *_mainTitle;
    UILabel *_time;
    UIImageView *_line;
}

- (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initialize];
    }
    return self;
}

- (void)initialize
{
    _mainTitle = [[UILabel alloc] init];
    _mainTitle.font = UIFontCustom(15);
    _mainTitle.textColor = kOrderBlack1;
    [self.contentView addSubview:_mainTitle];
    
    _time = [[UILabel alloc] init];
    _time.font  = UIFontCustom(15);
    _time.textColor = kOrderLightGrey1;
    [self.contentView addSubview:_time];
    
    _line = [[UIImageView alloc] init];
    _line.backgroundColor = kOrderLineGrey;
    [self.contentView addSubview:_line];
    
    [self makeConstraints];
}

- (void)makeConstraints
{
    [_mainTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.contentView);
        make.left.mas_equalTo(self.contentView).offset(ApplicationBackGauge);
    }];
    
    [_time mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.contentView);
        make.right.mas_equalTo(self.contentView).offset(-ApplicationBackGauge);
    }];
    
    [_line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.mas_equalTo(self.contentView);
        make.height.mas_equalTo(0.5);
    }];
}

- (void)fillData:(id)data
{
    if (!data) {
        return;
    }
    _mainTitle.text = kOrderLocalizeString(@"BKOrderDeliveryTime");//发货时间
    _time.text = data[@"time"];
}

+ (CGFloat)computeHeight:(id)data
{
    return 45;
}
@end
